This page last changed on Jun 29, 2006 by bowens.

Q: Tomcat throws a java.lang.NoClassDefFoundError on clean install

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE ServiceExceptionReport SYSTEM "http://server/geoserver/schemas//wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1"> <ServiceException code="">java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)
at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:193)
at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:156)

...

A:

This is because the JDK doesn't find an X11 server, probably because
you have a headless machine (without a graphic card).

since you use the JDK 1.4, setting the following system property in
the jvm command line should be enough :
-Djava.awt.headless=true

otherwise, the solution is to use a virtual XServer such as xvfb.

more explanations at http://www.ve.com/kavachart/solutions/xwindows.html

Thanks Philippe Duchesne

Document generated by Confluence on Jan 16, 2008 23:27